<template lang="html">
  <a-layout class="raiders table" style="background: #f0f0f0;">
    <div class="table__left">
      <div class="table-img" v-if="images.length > 0" @click="goList(images[0])">
        <img :src="`proxy/Ecp.Picture.getNoCheckView.img?pictureId=${images[0].FPhoto}`" :alt="images[0].FTitle">
        <span></span>
        <p v-html="images[0].FTitle"></p>
      </div>
    </div>
    <div class="table__right">
      <div class="table-img" v-if="images.length > 1" @click="goList(images[1])">
        <img :src="`proxy/Ecp.Picture.getNoCheckView.img?pictureId=${images[1].FPhoto}`" :alt="images[1].FTitle">
        <span></span>
        <p v-html="images[1].FTitle"></p>
      </div>
      <div class="table-img" v-if="images.length > 2" @click="goList(images[2])">
        <img :src="`proxy/Ecp.Picture.getNoCheckView.img?pictureId=${images[2].FPhoto}`" :alt="images[2].FTitle">
        <span></span>
        <p v-html="images[2].FTitle"></p>
      </div>
    </div>
  </a-layout>
</template>

<script>

import {invoke} from "@/api";
export default {
  data() {
    return {
      parentTitle: "旅游攻略",
      parentURL: "/raiders",
      images: []
    }
  },
  mounted() {
    this.loadData()
  },
  methods: {
    loadData() {
      invoke("api/WTM.TravelGuide.getNotCheckList",{
        pageCode: "WTM.TravelGuide.List"
      }).then((res) => {
        this.images = []
        this.images = res.records
      })
    },
    goList(list) {
      this.$router.push(({
        path: "/list-page",
        query: {
          parentTitle: this.parentTitle,
          parentURL: this.parentURL,
          FTitle: "列表",
          url: "api/WTM.TravelGuide.perpareNotCheckEdit",
          pageCode: "WTM.TravelGuide.Edit",
          listURL: "api/WTM.TravelGuide.getNotCheckList",
          listPageCode: "WTM.TravelGuide.List"
        }
      }))
    }
  }
}
</script>

<style lang="css">
</style>
